package Java100_1006;

import Java100_1006.operations.*;

import java.util.Scanner;

//普通用户
public class NormalUser extends User{
    //普通用户的构造方法
    public NormalUser(){
        this.operations = new IOperation[]{
                new ExitOperation(),
                new DisplayOperation(),
                new FindOperation(),
                new BorrowOperation(),
                new ReturnOperation()
        };
    }

    //打印普通用户的菜单
    @Override
    public int menu() {
        System.out.println("=============================");
        System.out.println("欢迎您"+this.getUserName()+"!");
        System.out.println("1. 查看书籍列表");
        System.out.println("2. 查找指定书籍");
        System.out.println("3. 借阅书籍");
        System.out.println("4. 归还书籍");
        System.out.println("0. 退出系统");
        System.out.println("=============================");
        System.out.println("请输入您的选项：");
        Scanner scanner = new Scanner(System.in);
        int choice = scanner.nextInt();
        return choice;
    }
}
